package com.zzp.zjs_bos.web.action;

import java.io.IOException;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.zzp.zjs_bos.domain.Workdermanage;
import com.zzp.zjs_bos.web.action.base.BaseAction;

@Controller
@Scope("prototype")
public class WorkdermanageAction extends BaseAction<Workdermanage> {
	
	public String save(){
		String flag = "1";
		try {
			workmanageService.save(model);
			
		} catch (Exception e) {
			e.printStackTrace();
			flag = "0";
		}
		
		try {
			ServletActionContext.getResponse().getWriter().write(flag);
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return NONE;
	}
	
	public String pageQuery(){
		workmanageService.pageQuery(pageBean);
		String[] excludes = new String[]{};
		this.writePageBean2Json(pageBean, excludes);
		return NONE;
	}
}
